package com.cloud.code.牛客网;

import java.util.Scanner;

//质数因子
public class Test65 {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        int num = Integer.parseInt(s);

        int sqrt = (int) Math.sqrt(num);
        print(num,sqrt);

    }

    private static void print(int num,int sqrt) {

        for (int i = 2; i < sqrt+1; i++) {
            if(num%i == 0){
                System.out.print(i+" ");
                if(num != i){
                    print(num/i,sqrt);
                }
                break;
            }

            if(i == sqrt){
                System.out.println(num+" ");
            }
        }



    }
}
